getCallingPackage

@Nullable
open fun getCallingPackage(@NonNull calledActivity: @NonNull Activity): @Nullable String(source)

Retrieve the name of the package that launched calledActivity from a share intent. Apps that provide social sharing functionality can use this to provide attribution for the app that shared the content.

Note: This data may have been provided voluntarily by the calling application. As such it should not be trusted for accuracy in the context of security or verification.

Return

Name of the calling package

Parameters

calledActivity

Current activity that was launched to share content